package com.mtrhz.xxx.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.mtrhz.esb.inteface.sso.MemberCallback;
import com.mtrhz.esb.inteface.sso.MemberSubscribeService;

@RestController
public class SubscribeConsumerController {
	
    //@Reference(version = "1.0.0") //放弃注解配置，原因：无法细化到方法级别
	@Autowired
    private MemberSubscribeService memberSubscribeService;
    
    @RequestMapping("/memberSubscribe")
	public String getToekn() {
    	
    	memberSubscribeService.subscribe("menmberPushService", new MemberCallback() {

			@Override
			public void pushChangedUsers(String msg) {
				System.out.println(msg);
			}
    		
    	});
		return "请查看控制台";
	}
}
